<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组的方法-some</title>
</head>
<body>
  <script>
    /*
      some: 
        检测数组中是否存在满足条件的元素，如果有，返回true，否则返回false
        特点：找一个满足条件的就不找了
    */
    let nums = [18, 20, 9, 5]
    // let r = nums.some(item => {
    //   console.log('some')
    //   return item > 10
    // })
    let r = nums.some(item => {
      console.log('some')
      return item > 100
    })
    console.log(r)


  </script>
</body>
</html>